{include file="header.tpl"}

   <h1>{$lookup_name}</h1>

   {include file="admin_sidebar.tpl"}

   <div id="content">
   
      {include file="flashes.tpl"}

      <div class="action_bar">
         <a class="add" href="{$spf.base_url}/lookup/edit/{$table_name}/">Add {$lookup_name}</a>
      </div>
      
      <table rules="all" frame="box">
         <thead>
            <tr>
               <th>Description</th>
               {if $has_system_type}<th>System Type</th>{/if}
               <th class="center">Active</th>
               <th class="center">Edit</th>
               <th class="center">Delete</th>
            </tr>
         </thead>
         <tbody>
            {foreach item=lookup from=$data}
            <tr class="{cycle values=",alt"}">
               <td>{$lookup.description}</td>
               {if $has_system_type}<td>{$lookup.system_type}</td>{/if}
               <td class="center"><img src="img/{if $lookup.active}tick{else}cross{/if}.png" alt="" /></td>
               <td class="edit"><a href="{$spf.base_url}/lookup/edit/{$table_name}/{$lookup.id}"></a></td>
               <td class="delete"><a href="#" onclick="spf.sitrack.confirm('/lookup/delete/{$table_name}/{$lookup.id}')"></a></td>
            </tr>
            {/foreach}
            {if !$data}<tr><td class="norecords" colspan="10">No records found.</td></tr>{/if}
         </tbody>
      </table>
      <div class="clear"></div>
      
   </div>
   
{include file="footer.tpl"}
